{% extends "index_base.html" %}

{% load generic_content %}
{% load typogrify %}

{% block recentblogentries %}
{% load comments %}
    {% get_latest_object texblog.entry as entry %}
    {% get_comment_count for entry as comment_count %}
    <div class="articleinfo">
        <h1><a href="{{entry.get_absolute_url}}">{{entry.title|widont|smartypants|safe}}</a></h1>
        <p class="meta">by {{entry.author.first_name}} {{entry.author.last_name}}, {{entry.pub_date|date:"l, F j, Y"}}{% if comment_count %} | Comments: {{comment_count}}{%endif%}</p>
        {% if entry.abstract_html %}
            {{entry.abstract_html|safe}}
        {% else %}
            {{entry.body_html|truncatewords_html:60|safe}}
        {% endif %}
        <p class="continue"><a href="{{entry.get_absolute_url}}">Continue reading...</a></p>
    </div>
    {% get_latest_objects texblog.entry 5 as weblogentries %}
    <div class="articleinfo">
    <p class="meta">Older weblog entries:</p>
    {% for entry in weblogentries|slice:"1:" %}
        {% get_comment_count for entry as comment_count %}
        <h5><a href="{{entry.get_absolute_url}}">{{entry.title|widont|smartypants|safe}}</a></h5>
        <p class="meta">by {{entry.author.first_name}} {{entry.author.last_name}}, {{entry.pub_date|date:"l, F j, Y"}}{% if comment_count %} | Comments: {{comment_count}}{%endif%}</p>
    {% endfor %}
    </div>
{% endblock recentblogentries %}
{% block abouttexample %}
    TeXample.net is a web site dedicated to the wonderful world of TeX and friends.
    
    <div><p></p><a href="/tikz/examples/rotated-triangle/"><img src="{{MEDIA_URL}}img/rottriangle.png" /></a></div>
{% endblock abouttexample %}




{% block tikzsection %}
<h2><a href="{%url tikz_index %}">Ti<i>k</i>Z and PGF</a></h2>

<p><a href="{% url texgallery_index %}">Examples</a> | <a href="{% url pkgresources_index %}">Resources</a> | <a href="{% url pkgbuilds_index %}">Builds</a></p>
{% block tikz_examples %}
{% get_latest_objects texgallery.exampleentry 2 as tikzexamples %}

<p><a href="{% url texgallery_index %}">Latest Ti<i>k</i>Z examples</a>:</p>
<div class="gallery">
    {% for entry in tikzexamples %}
    <dl{% if forloop.counter|divisibleby:"2" %} class="omega"{%endif%}>
        <dt><a href="{{entry.get_absolute_url}}"><img src="{{GALLERY_URL}}thumbs/{{entry.slug}}.jpg" alt="{{entry.title}}" /></a></dt>
        <dd><a href="{{entry.get_absolute_url}}">{{entry.title}}</a></dd>
    </dl>
    {% endfor %}
</div>
    <p><a href="{% url texgallery_all_alpha %}">Show all examples</a> |
    <a href="{% url texgallery_all_date %}">Show in chronological order</a></p>
{% endblock tikz_examples %}

{% endblock tikzsection %}

{% block community %}
<h2><a href="/community">Community</a></h2>
<p>Latest from the TeX community aggregator:</p>
{% get_latest_objects aggregator.feeditem 5 as items %}
{% for item in items %}
<p class='meta'>Posted on {{ item.date_modified|date:"F j, Y" }} by <a href="{{ item.feed.public_url }}">{{ item.feed.title }}</a></p>
<h5><a href="{{ item.link }}">{{ item.title }}</a></h5>

{% endfor %}
<p><a href="/community/">View all entries...</a></p>
<p class="feedlink"><a href="{% url top_feeds "community" %}">Subscribe to the TeX community RSS feed</a></p>
{% endblock community %}


